<template>
    <div class="user">
        <p>昵称:{{$store.state.user.nickname}}</p>
        <p>联系方式:{{$store.state.user.phone||'联系方式还没有，请编辑'}}</p>
        <p>头像: <img v-if="$store.state.user.img" :src="$store.state.user.img" alt=""> <span v-else>请上传头像</span></p>
        <el-button @click="edit($store.state.user.id)">编辑个人资料</el-button>

    </div>
</template>

<script>
    export default {
        
    }
</script>

<style scoped>
.user{
    padding: 20px;
    border: 1px solid #f1f1f1;
}
.user p{
    line-height: 30px;
}
.user img{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    vertical-align: middle;
}

</style>